home *** CD-ROM | disk | FTP | other *** search
Wrap
iiiiffffllllCCCCllllaaaassssssssLLLLiiiisssstttt((((3333)))) IIIImmmmaaaaggggeeee FFFFoooorrrrmmmmaaaatttt LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll iiiiffffllllCCCCllllaaaassssssssLLLLiiiisssstttt((((3333)))) NNNNAAAAMMMMEEEE iiiiffffllllCCCCllllaaaassssssssLLLLiiiisssstttt - class inheritance chain IIIINNNNHHHHEEEERRRRIIIITTTTSSSS FFFFRRRROOOOMMMM This is a base class HHHHEEEEAAAADDDDEEEERRRR FFFFIIIILLLLEEEE #include <ifl/iflClassList.h> CCCCLLLLAAAASSSSSSSS DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN iflClassList is used to statically create a class inheritance chain; it's not setup to deal with multiple inheritance, just the "primary" base class. UUUUssssaaaaggggeeee Put the iiiiffffllllCCCCllllaaaassssssssLLLLiiiissssttttDDDDeeeeccccllllaaaarrrreeee macro in the public section of a class declaration derived from a base class and the iiiiffffllllCCCCllllaaaassssssssLLLLiiiissssttttIIIImmmmpppplllleeeemmmmeeeennnnttttBBBBaaaasssseeee or iiiiffffllllCCCCllllaaaassssssssLLLLiiiissssttttIIIImmmmpppplllleeeemmmmeeeennnnttttDDDDeeeerrrriiiivvvveeeedddd macro in the implementation file. These macros will declare and implement the methods described below, thus allowing the class hierarchy to be interrogated. Refer to <il/ilLink.h> and <il/ilImage.h> for examples of the use of these macros. PPPPuuuubbbblllliiiicccc mmmmeeeetttthhhhooooddddssss aaaaddddddddeeeedddd The folling public methods are added to the invoking class by the iflClassListImplementXXX macros: ggggeeeettttCCCCllllaaaassssssssNNNNaaaammmmeeee(((()))) virtual char* getClassName(int parentIdx=0) This method specifies the name of the class for this object instantiantion (or of the nearest ancestor class that registers itself using this macro.) The optional _p_a_r_e_n_t_I_d_x argument allows the name of one of the parent classes to be returned, the values specifies how may levels of the class hierarchy to traverse. ggggeeeettttCCCCllllaaaassssssssIIIIdddd(((()))) virtual iflClassId getClassId() This method returns the class ID for this object instantiantion. ddddeeeerrrriiiivvvveeeessssFFFFrrrroooommmm(((()))) virtual int derivesFrom(iflClassId classID) PPPPaaaaggggeeee 1111 iiiiffffllllCCCCllllaaaassssssssLLLLiiiisssstttt((((3333)))) IIIImmmmaaaaggggeeee FFFFoooorrrrmmmmaaaatttt LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll iiiiffffllllCCCCllllaaaassssssssLLLLiiiisssstttt((((3333)))) This method returns TRUE if this object instantiantion derives from the class indicated by classID. This classID is formed using the iflClassID macro defined in ilTypes.h; e.g. "iflClassID(ilImage)" PPPPrrrrooootttteeeecccctttteeeedddd mmmmeeeetttthhhhooooddddssss aaaaddddddddeeeedddd The following protected method is added to the invoking class by the iflClassListImplementXXX macros: ggggeeeettttDDDDeeeeffffaaaauuuullllttttDDDDeeeessssccccrrrriiiippppttttiiiioooonnnn(((()))) virtual char* getDefaultDescription() This method returns the default description for this object instantiantion. This is the string supplied in the iflClassListImplement* macros. CCCCLLLLAAAASSSSSSSS MMMMEEEEMMMMBBBBEEEERRRR FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNN SSSSUUUUMMMMMMMMAAAARRRRYYYY CCCCllllaaaassssssss llllooooooookkkkuuuupppp mmmmeeeetttthhhhooooddddssss int find(iflClassId classID) char* find(int parentIdx) FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNN DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNNSSSS ffffiiiinnnndddd(((()))) char* find(int parentIdx) int find(iflClassId classID) This first version returns the name of the class, _p_a_r_e_n_t_I_d_x levels up in the class list. The second versions returns TRUE if _c_l_a_s_s_I_D is found in the class list. PPPPaaaaggggeeee 2222